import os
import time


def formattime():
  import time
  # print(time.localtime())
  result = time.strftime('%Y%m%d.%H%M%S', time.localtime())
  # print(result)
  return result


if __name__ == '__main__':
  i = 0
  number = int(input('请输入需要生成的文件数：'))
  while i < number: 
    name = formattime() + '.txt'
    file = open(name, 'w')
    time.sleep(1)
    i += 1
    message = 'file ' + str(i) + ': ' + name
    print('file', i, name)
  print('文件创建完成')
